package com.yigerende.service.impl;

import com.yigerende.dao.MenuDao;
import com.yigerende.pojo.TMenu;
import com.yigerende.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuDao menuDao;


    @Override
    public List<TMenu> findAll(Map<String, Integer> map) {
        return menuDao.findAll(map);
    }

    @Override
    public int count() {
        return menuDao.count();
    }

    @Override
    public TMenu findById(Integer id) {
        return menuDao.findById(id);
    }

    @Override
    public int save(TMenu tMenu) {
        return menuDao.save(tMenu);
    }

    @Override
    public int update(TMenu tMenu) {
        return menuDao.update(tMenu);
    }

    @Override
    public int deleteById(Integer id) {
        return menuDao.deleteById(id);
    }
}
